﻿<UserControl x:Class="ThumbGen.PopupInfoControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:ThumbGen">
    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
        <local:CountryImageConverter x:Key="CountryImageConverter"/>
        <Style TargetType="{x:Type Image}">
            <Setter Property="Width" Value="16"/>
            <Setter Property="Height" Value="16"/>
            <Setter Property="Margin" Value="2 0 0 0"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="SnapsToDevicePixels" Value="True"/>
        </Style>

    </UserControl.Resources>
    <Grid x:Name="TheGrid">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Image Grid.Column="0" Source="{Binding Country,Converter={StaticResource CountryImageConverter}}" Visibility="Visible"
               ToolTip="{Binding Country, FallbackValue=Unknown}"/>
        <Image Grid.Column="1" Source="/images/movie.png" Visibility="{Binding SupportsMovieInfo,Converter={StaticResource BoolToVisibilityConverter}}"
               ToolTip="Returns movie information"/>
        <Image Grid.Column="2" Source="/images/IMDb_small.png" Visibility="{Binding SupportsIMDbSearch,Converter={StaticResource BoolToVisibilityConverter}}"
               ToolTip="Supports searching by IMDb ID"/>
        <Image Grid.Column="3" Source="/images/backdrop.png" Visibility="{Binding SupportsBackdrops,Converter={StaticResource BoolToVisibilityConverter}}"
               ToolTip="Supports backdrops and fanart"/>
    </Grid>
</UserControl>
